import os
from AIYIgames import GamePlatform

# 创建游戏平台实例
platform = GamePlatform()

# 遍历 ./players 目录下的所有文件
players_dir = "./players"
for filename in os.listdir(players_dir):
    if filename.endswith(".py"):  # 只处理以 .py 结尾的文件
        player_name = os.path.splitext(filename)[0]  # 移除文件扩展名
        player_module = f"players.{player_name}"
        platform.register_participant(player_name, player_module)

# 进行比赛、挑战Boss等操作
# ...
platform.run_tournament()

# 显示排行榜
platform.show_leaderboard()
